package com.util;

public class resetUnit {

    public static void reset(byte[] source, int mlen) {
        for (int i = 0; i < mlen; i++) {
            source[i] = 0;
        }
    }

    public static byte[] reset32(byte[] source,int mlen){
        byte[] result = new byte[mlen];
        for(int i=0;i<mlen;i++){
            result[i] = source[i];
        }
        return result;
    }

    public static byte[] reset288(byte[] source,int mlen){
        byte[] result = new byte[288];
        int count = 0;
        for(int i=mlen;i<320;i++){
            result[count++] = source[i];
        }
        return result;
    }

    public static byte[] reset320(byte[] source32,byte[] source288){
        byte[] result = new byte[320];
        int count = 0;
         for(int i=0;i<source32.length;i++){
           result[i] = source32[i];
        }
        for(int j=source32.length;j<320;j++){
            result[j] = source288[count++];
        }
        return result;
    }
}
